From: Keir Fraser Date: Mon, 2 Jun 2008 09:03:18 +0000 (+0100) Subject: vtd: build fix. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14200^2~111 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=f368c2f69dcd5538977361a53267dc89ca135c09;p=xen.git vtd: build fix. Signed-off-by: Akio Takebe --- diff --git a/xen/drivers/passthrough/vtd/intremap.c b/xen/drivers/passthrough/vtd/intremap.c index 0eb16ebf37..3b6a2795c4 100644 --- a/xen/drivers/passthrough/vtd/intremap.c +++ b/xen/drivers/passthrough/vtd/intremap.c @@ -60,7 +60,7 @@ static void remap_entry_to_ioapic_rte( } remap_rte = (struct IO_APIC_route_remap_entry *) old_rte; - index = (remap_rte->index_15 << 15) + remap_rte->index_0_14; + index = (remap_rte->index_15 << 15) | remap_rte->index_0_14; if ( index > ir_ctrl->iremap_index ) panic("%s: index (%d) is larger than remap table entry size (%d)!\n", @@ -140,7 +140,7 @@ static void ioapic_rte_to_remap_entry(struct iommu *iommu, /* now construct new ioapic rte entry */ remap_rte->vector = new_rte.vector; remap_rte->delivery_mode = 0; /* has to be 0 for remap format */ - remap_rte->index_15 = index & 0x8000; + remap_rte->index_15 = (index >> 15) & 0x1; remap_rte->index_0_14 = index & 0x7fff; remap_rte->delivery_status = new_rte.delivery_status; @@ -269,7 +269,7 @@ static void remap_entry_to_msi_msg( remap_rte = (struct msi_msg_remap_entry *) msg; index = (remap_rte->address_lo.index_15 << 15) | - remap_rte->address_lo.index_0_14; + remap_rte->address_lo.index_0_14; if ( index > ir_ctrl->iremap_index ) panic("%s: index (%d) is larger than remap table entry size (%d)\n", @@ -368,7 +368,7 @@ static void msi_msg_to_remap_entry( /* now construct new MSI/MSI-X rte entry */ remap_rte->address_lo.dontcare = 0; - remap_rte->address_lo.index_15 = index & 0x8000; + remap_rte->address_lo.index_15 = (index >> 15) & 0x1; remap_rte->address_lo.index_0_14 = index & 0x7fff; remap_rte->address_lo.SHV = 1; remap_rte->address_lo.format = 1;